package pack1;

import java.util.concurrent.TimeUnit;

import org.openqa.selenium.Alert;
import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.firefox.FirefoxDriver;
import org.openqa.selenium.security.Credentials;

public class sprg23 {
public static void main(String[] args) throws InterruptedException {
	WebDriver driver=new FirefoxDriver();
driver.manage().window().maximize();
driver.manage().timeouts().implicitlyWait(10, TimeUnit.SECONDS);
driver.get("https://demo.vtiger.com");
driver.findElement(By.id("submitButton")).click();
driver.findElement(By.linkText("Products")).click();

Thread.sleep(1200);
driver.findElement(By.xpath("//input[@id='55']")).click();
driver.findElement(By.xpath("//input[@value='Delete']")).click();

Thread.sleep(1200);
Alert alerrt=driver.switchTo().alert();
String s=alerrt.getText();
	System.out.println(s);
	
	Thread.sleep(1200);
	alerrt.dismiss();
}
}
